import request from '@/utils/request';

// 险种管理首页查询
export function riskList(params) {
  return request({
    url: '/admin/risk/list',
    method: 'get',
    params,
  })
}

// 险种新增
export function addRisk(data) {
  return request({
    url: '/admin/risk',
    method: 'post',
    data,
  })
}

// 查看险种详情
export function detailRisk(params) {
  console.log("params", params);
  return request({
    url: `/admin/risk/${params.riskId}`,
    method: 'get',
  })
}

// 编辑引流链接
export function editRisk(data) {
  console.log(data);
  return request({
    url: `/admin/risk`,
    method: 'put',
    data
  })
}

// 险种删除
export function deleteLink(params) {
  return request({
    url: `/admin/risk/${params.riskIds}`,
    method: 'delete',
  })
}

// categoryDel
export function categoryDel(params) {
  return request({
    url: `/admin/risk/deleteCategory/${params}`,
    method: 'delete',
  })
}

